package cn.edu.zafu.bigdata.mahuilin;

public class Course {  //课程属性
    private String courseName; //课程名称
    private String courseCode; //课程代码
    private double credits; //学分
    private String instructor; //授课教师

    // 构造函数
    public Course(String courseName, String courseCode,  double credits,String instructor) {
        this.courseName = courseName;
        this.courseCode = courseCode;
        this.credits = credits;
        this.instructor = instructor;
    }

    // 打印课程信息的方法
    public void print() {
        System.out.println("课程名称: " + courseName);
        System.out.println("课程代码: " +courseCode);
        System.out.println("学分: " + credits);
        System.out.println("授课教师: " + instructor);
    }

    // 主方法进行测试
    public static void main(String[] args) {
        Course course = new Course("java面向对象程序设计", "C666", 4.0, "吴鹏");
        course.print();
    }
}
